<?php

echo '<div class="header">';

$new_mail = mysql_query("SELECT * FROM `mail` WHERE (`adresat` = '$uid' AND `chit` = '0' AND `type` = 'in')");
if(mysql_num_rows($new_mail) > 0 && $uid){
echo '<div class="mail1"><a href="http://'.$set['home'].'/mail/index.php?a=new" class="mail1">';
echo '<img style="float: left;" src="http://'.$set['home'].'/design/'.$user['design'].'/img/mail.png"></div>';
echo '</a>';
}else{
echo '<div class="mail1"><a href="http://'.$set['home'].'/office.php" class="mail1">';
echo '<img style="float: left;" src="http://'.$set['home'].'/design/'.$user['design'].'/img/office.png"></div>';
echo '</a>';  
}

    if($uid){
        echo '<div class="user"><a href="http://'.$set['home'].'/exit.php" class="user">';
    echo '<img style="float: right;" src="http://'.$set['home'].'/design/'.$user['design'].'/img/exit.png"></div>';
}else{
    echo '<div class="user"><a href="http://'.$set['home'].'/reg.php" class="user">';
    echo '<img style="float: right;" src="http://'.$set['home'].'/design/'.$user['design'].'/img/plus.png"></div>';
}
echo '</a>';

echo '<div class="logo">';
echo '<a href="http://'.$set['home'].'"><img src="http://'.$set['home'].'/design/'.$user['design'].'/img/logo.png"></img></a>';
echo '</div>';

echo '</div>';
echo '<div class="right">';
include($root.'design/'.$user['design'].'/2.php');
echo '</div>';
echo '<div class="block">';